package cn.wx.shop.result;

/**
 * ajax返回结果
 * 
 * @author acer
 *
 */
public class AjaxResult {

	private String message;

	private Boolean status;

	private int code;// 200 500 401 403

	public AjaxResult() {
		super();
	}

	public AjaxResult(String message, Boolean status, int code) {
		super();
		this.message = message;
		this.status = status;
		this.code = code;
	}

	public static AjaxResult result(String message, Boolean status, int code) {
		return new AjaxResult(message, status, code);
	}

	public static AjaxResult succes(String message) {
		return new AjaxResult(message, true, 200);
	}

	public static AjaxResult error(String message) {
		return new AjaxResult(message, false, 500);
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

}
